<header>

    <!-- header top start -->
    <div class="header-top-area bg-gray text-center text-md-left">
        <div class="container">
            <div class="row">
                <div class="col-lg-6 col-md-5">
                    <div class="header-call-action">
                        <a href="/">
                            葛洲坝再生资源网首页
                        </a>
                        <a href="#">
                            <i class="fa fa-map-marker"></i>
                            大连
                        </a>
                    </div>
                </div>
                <div class="col-lg-6 col-md-7">
                    <div class="header-top-right float-md-right float-none">
                        <nav>
                            <ul>
                                {% if controller.is_login %}
                                    <li class="text-welcome ">您好{% if controller.user.nickname %}<strong>, {{controller.user.nickname}}</strong>{% endif %}</li>
                                    <li>
                                        <div class="dropdown header-top-dropdown">
                                            <a class="dropdown-toggle" id="myaccount" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="height: 100%;display: inline-block;">
                                                我的
                                                <i class="fa fa-angle-down"></i>
                                            </a>
                                            <div class="dropdown-menu" aria-labelledby="myaccount" style="min-width: initial;">
                                                <a class="dropdown-item" href="/center/seting">我的资料</a>
                                                <a class="dropdown-item" {{('/center/order')|get_auth_url(controller.user)| safe}}>我的订单</a>
                                                <a class="dropdown-item" {{('/center/fabu')|get_auth_url(controller.user)| safe}}>我的发布</a>
                                                <a class="dropdown-item" {{('/center/message')|get_auth_url(controller.user)| safe}}>我的消息</a>
                                                <a class="dropdown-item" href="/center/public/logout">退出登录</a>
                                            </div>
                                        </div>
                                    </li>
                  
                                    <li>
                                        <div class="dropdown header-top-dropdown">
                                            <a class="dropdown-toggle" id="myaccount" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="height: 100%;display: inline-block;">
                                                客户服务
                                                <i class="fa fa-angle-down"></i>
                                            </a>
                                            <div class="dropdown-menu" aria-labelledby="myaccount" style="min-width: initial;">
                                                <a class="dropdown-item"  {{('/home/cs')|get_auth_url(controller.user,'data-toggle="ajaxModal"')| safe}} >留言</a>
                                            </div>
                                        </div>
                                    </li>

                                    <li>
                                        <a href="#">订阅</a>
                                    </li>
                                {% else %}
                                    <li>
                                        <a href="/center/public/login" data-toggle="ajaxModal"><i></i>请登录</a>
                                    </li>
                                    <li>
                                        <a href="/center/public/register"><i></i>免费注册</a>
                                    </li>
                                {% endif %}

                                
                                <li>
                                    <div id="dd" style="position: relative;">
                                        <a href="#">手机APP</a>
                                        <div class="erweima">
                                            <div style="text-align: center;"><img src="/static/assets_new/img/ios.png"><span>iOS版APP</span></div>
                                            <div style="text-align: center;"><img src="/static/assets_new/img/android.png"><span>安卓版APP</span></div>
                                        </div>
                                        
                                    </div>

                                </li>
                            </ul>
                        </nav>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- header top end -->

    <!-- header middle start -->
    <div class="header-middle-area pb-20 white-bg">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-lg-4">
                    <div class="brand-logo">
                        <a href="/">
                            <img src="/static/assets_new/img/logo/logo.png" alt="brand logo">
                        </a>
                    </div>
                </div> <!-- end logo area -->
                <div class="col-lg-8">
                    <div class="header-middle-right">

                        <div class="header-middle-block">
                            <div class="header-middle-searchbox">
                                    <form action="/search" method="get">
                                        <input type="text" name="q" placeholder="请输入关键字" required>
                                        <button class="search-btn" type="submit">搜索</button>
                                    </form>
                            </div>
                            <div class="header-mini-cart">
                                <div class="cart-total-price">
                                    <a {{('/xinxifabu?mokuaibiaoshi=1')|get_auth_url(controller.user)| safe}} >一键发布</a>       
                                </div>
                            </div>
                            <div class="header-mini-cart">
                                <div class="cart-total-price">
                                    <a {{('/xiadan?mokuaibiaoshi=0')|get_auth_url(controller.user)| safe}} >点就收</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- header middle end -->

    <!-- main menu area start -->
    <div class="main-header-wrapper bdr-bottom1">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="main-header-inner">
                        <div class="main-menu">
                            <nav id="mobile-menu">
                                <ul>
                                    {% channel data='channel'%}
                                    {% for val in channel%}
                                    {%if val.status > 0%}
                                    <li class="{% if val.url =='/' %}category-toggle-wrap{% endif %} {% if val.children %}dropdown{% endif %} {% if (category.id|in_Array(val.on)) or (val.url|in_Array(controller.active)) %}active{% endif %}">
                                           
                                            <a {% if val.children%}class="dropdown-toggle" {% endif %} href="{{val.url}}" {%if val.target ==1%} target="_blank"{%endif%}>{{val.title}}</a>
                                            {% if val.url=='/' and val.url|in_Array(controller.active)%}
                                            <nav class="category-menu category-style-2">
                                                <ul>
                                                    {% for val in typevar.rules %}
                                                    <li class="menu-item-has-children">
                                                            <a href="/shangping-0-0-16-{{val.id|sort_url(typevar.option.identifier,[typevar],{})| urlencode}}">
                                                                <div class="media">
                                                                    <i  class="align-self-center" style="background-image:url('{{map[val.id]}}');background-size:cover;display: inline-block;width: 25px;height: 25px;"></i>
                                                                    <div class="col align-self-center">{{val.label}}</div>
                                                                </div>
                                                                
                                                                <p>{{val.children|slice_array(1,4)|array_mapjoin('label',' ')}}</p>
                                                            </a>
                                                        </li>
                                                    {% endfor %}
                                                </ul>
                                            </nav>
                                            {%endif%}
                                            {% if val.children%}
                                            <ul class="dropdown-menu">
                                                {% for _val in val.children%}
                                                {%if _val.status > 0%}
                                                <li class="{% if _val.children%}dropdown{% endif %} {% if category.id|in_Array(_val.on) %}active{% endif %}">
                                                    <a {% if _val.children%}class="dropdown-toggle" {% endif %} href="{{_val.url}}" {%if _val.target ==1%} target="_blank"{%endif%}>{{_val.title}}</a>
                                                    {% if _val.children%}
                                                    <ul class="dropdown-menu">
                                                        {% for __val in _val.children%}
                                                        {%if __val.status > 0%}
                                                        <li class="{% if category.id|in_Array(__val.on) %}active{% endif %}"><a href="{{__val.url}}" {%if __val.target ==1%} target="_blank"{%endif%}>{{__val.title}}</a></li>
                                                        {% endif%}
                                                        {% endfor %}
                                                    </ul>
                                                    {% endif %}
                                                </li>
                                                {% endif%}
                                                {% endfor %}
                                            </ul>
                                           
                                            <span class="aline"></span>
                                            {% endif %}
                                    </li>      
                                    {% endif%}
                                    {% endfor %}
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>
                <div class="col-12 d-block d-lg-none"><div class="mobile-menu"></div></div>
            </div>
        </div>
    </div>
    <!-- main menu area end -->

</header>
